<?php

include_once($_SERVER['DOCUMENT_ROOT'] . '/smartrfid/model/ticket.php');
include_once($_SERVER['DOCUMENT_ROOT'] . '/smartrfid/dto/ticketdto.php');
error_reporting(0);

$limit = $_GET['limit'];
$skip = $_GET['skip'];
$orderBy = $_GET['orderBy'];
$filters = $_GET['filters'];
$addRfids = $_GET['addRfids'];
$identifier = $_GET['identifiers'];

$t=new Ticket();
$tickets = $t->loadByIdentifier($identifier);

$list=array();
foreach($tickets as $ticket) {
  array_push($list, new Ticketdto($ticket));
  
}

echo json_encode($list[0]);

?>